Text prediction is used to fill in possible following words of phrases given past text. Simple versions based on n-gram frequencies can be used to offer typing suggestions or correct misspellings, but more complex predictions, especially those in large-language models can continue the text, almost indefinitely as found in chatbots such as ChatGPT and Bard.
Used on page 411